/*
 * iUserInterface.h
 *
 *  Created on: 28.04.2009
 *      Author: h3llfire
 */

#ifndef IUSERINTERFACE_H_
#define IUSERINTERFACE_H_

#include "iBuddyList.h"
#include "iChatWindow.h"
#include "../Account.h"
#include <wx/menu.h>
#include <wx/imaglist.h>

namespace Impp {

class iMenu;
class iIcons;

typedef void (wxCALLBACK *addMenuItemCallback)(iMenu* menu, void* userData);
typedef void (wxCALLBACK *addBuddyMenuItemCallback)(iMenu* menu, Buddy* buddy);

enum SpecialBitmap{
	BITMAP_IMPP_ICON,
	BITMAP_NEW_MSG,
	BITMAP_NO_AVATAR
};


class iUserInterface : public iModule{

	DECLARE_ABSTRACT_CLASS(iUserInterface)

public:
	iUserInterface(){};
	virtual ~iUserInterface(){};

	virtual void moduleInit() = 0;
	virtual void moduleDestroy() = 0;

	virtual void buildChooseStatusMenu(wxMenu* menu, Account* account, bool invisible) = 0;
	virtual void buildBuddyMenu(wxMenu* menu, Buddy* buddy) = 0;
	virtual void buildGroupMenu(wxMenu* menu, Group* group) = 0;
	virtual void buildMainMenu(wxMenu* menu) = 0;

	virtual bool showFirstRunWizzard() = 0;

	virtual void reigsterBuddyMenuEntryAdder(const wxString & moduleName, addBuddyMenuItemCallback callback) = 0;
	virtual void reigsterMainMenuEntryAdder(const wxString & moduleName, addMenuItemCallback callback) = 0;

	virtual iIcons* getIcons() = 0;

};

class iMenu{

public:
	virtual void appendItem(const wxString & actionName, const wxString & item, const int & defaultOrder, const wxString & helpString = wxEmptyString) = 0;
	virtual void appendCheckItem(const wxString & actionName, const wxString & item, const bool checked, const int & defaultOrder, const wxString & helpString = wxEmptyString) = 0;
	virtual iMenu* appendOrGetSubMenu(const wxString & actionName, const wxString & item, const int & defaultOrder, const wxString & helpString) = 0;
};

class iIcons{

public:
	virtual wxBitmap getStatusIcon(const Status & status) = 0;
	virtual wxImageList* getStatusImageList() = 0;
	virtual int getStatusImageListId(const Status & status) = 0;
	virtual void registerActionIcon(const wxString & moduleName,const wxString & actionName, const wxString & iconFile) = 0;
	virtual void registerActionIcon(const wxString & moduleName, const wxString & actionName, const wxBitmap & bmp) = 0;
	virtual wxBitmap getActionIcon(const wxString & moduleName,const wxString & actionName) = 0;
	virtual wxBitmap getBitmap(const wxString & iconFile) = 0;
	virtual wxBitmap getSpecialBitmap(const SpecialBitmap & special) = 0;
};

}

#endif /* IUSERINTERFACE_H_ */
